﻿unit VDGOSpecFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, AppUtils, BaseForm, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, dxSkinsCore, dxSkinOffice2010Blue, dxSkinscxPCPainter,
  cxPropertiesStore, dxLayoutLookAndFeels, dxLayoutContainer, dxLayoutControl,
   cxClasses, cxStyles, cxCustomData,
  cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator, Data.DB, cxDBData,
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
  cxGridCustomView, cxGrid, dxSkinOffice2013White, cxGridInplaceEditForm,
  VDGOSpecRepo, dxSkinDevExpressStyle, dxSkinVS2010, cxEditRepositoryItems,
  dxCore, cxGridStrs,
  dxSkinsdxBarPainter, dxBar;

type
  TVDGOSpecForm = class(TDezForm)
    grp1: TdxLayoutGroup;
    lc1: TdxLayoutControl;
    lf1: TdxLayoutLookAndFeelList;
    lcf1: TdxLayoutCxLookAndFeel;
    prop1: TcxPropertiesStore;
    v1: TcxGridDBTableView;
    l1: TcxGridLevel;
    grd1: TcxGrid;
    litm_lc1Item1: TdxLayoutItem;
    lGrplc1Group2: TdxLayoutGroup;
    clv1STREETNAME: TcxGridDBColumn;
    clv1NOMER: TcxGridDBColumn;
    clv1HOUSE: TcxGridDBColumn;
    clv1FLATCNT: TcxGridDBColumn;
    clv1F1: TcxGridDBColumn;
    clv1F2: TcxGridDBColumn;
    clv1F3: TcxGridDBColumn;
    clv1F4: TcxGridDBColumn;
    clv1F5: TcxGridDBColumn;
    clv1F6: TcxGridDBColumn;
    clv1F7: TcxGridDBColumn;
    clv1F8: TcxGridDBColumn;
    clv1F9: TcxGridDBColumn;
    clv1F10: TcxGridDBColumn;
    clv1F11: TcxGridDBColumn;
    clv1F12: TcxGridDBColumn;
    src_DS: TDataSource;
    rep1: TcxEditRepository;
    Itmrep1SpinItem1: TcxEditRepositorySpinItem;
    barM1: TdxBarManager;
    br1: TdxBar;
    btn_LoadData: TdxBarButton;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
    fRepo: TVDGOSpecRepo;
    procedure PrepareDS;
  public
    { Public declarations }
  end;

var
  VDGOSpecForm: TVDGOSpecForm;

implementation

uses cmDBUnit;

{$R *.dfm}


procedure TVDGOSpecForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action:= caFree;
end;

procedure TVDGOSpecForm.FormCreate(Sender: TObject);
begin
  LoadForm(prop1,Self.Name);
  PrepareDS;
end;

procedure TVDGOSpecForm.PrepareDS;
begin
  fRepo:= TVDGOSpecRepo.Create;
  src_DS.DataSet:= fRepo.DS;
  fRepo.DS.Open();
end;

initialization
 RegisterClass(TVDGOSpecForm);
 cxSetResourceString(@scxGridFindPanelClearButtonCaption, 'Очистить');
 cxSetResourceString(@scxGridFindPanelFindButtonCaption , 'Найти');
end.
